package com.wy.w_ui.tab.bottom;


import android.graphics.Bitmap;

import androidx.fragment.app.Fragment;

public class WTabBottomInfo<Color> {

    public enum TabType{
        BITMAP,ICON
    }

    public Class<? extends Fragment> fragment;
    public String name;
    public Bitmap defaultBitmap;
    public Bitmap selectedBitmap;
    //java 代码中直接设置 icon fount 无效,需要定义在 string.xml 中
    public String iconFount;
    public String defaultIconName;
    public String selectedIconName;
    public Color defaultColor;
    public Color selectedColor;
    public TabType tabType;

    /**
     * 传递 bitmap
     * @param name
     * @param defaultBitmap
     * @param selectedBitmap
     */
    public WTabBottomInfo(String name,Bitmap defaultBitmap,Bitmap selectedBitmap){
        this.name = name;
        this.defaultBitmap = defaultBitmap;
        this.selectedBitmap = selectedBitmap;
        this.tabType = TabType.BITMAP;
    }


    /**
     * 传递 iconFount
     * @param name
     * @param iconFount
     * @param defaultIconName
     * @param selectedIconName
     * @param defaultColor
     * @param selectedColor
     * @param tabType
     */
    public WTabBottomInfo(String name,String iconFount,String defaultIconName,String selectedIconName,Color defaultColor,Color selectedColor,TabType tabType){
        this.name = name;
        this.iconFount = iconFount;
        this.defaultIconName = defaultIconName;
        this.selectedIconName = selectedIconName;
        this.defaultColor = defaultColor;
        this.selectedColor = selectedColor;
        this.tabType = tabType;
    }

}
